//
//  TOAuthorSectionModel.m
//  SeaGullFM
//
//  Created by dllo on 15/11/21.
//  Copyright © 2015年 tianou. All rights reserved.
//

#import "WSAuthorSectionModel.h"
#import <BmobSDK/BmobObject.h>

@implementation WSAuthorSectionModel

-(instancetype)init
{
    self = [super init];
    if (self) {
        
        
    }
    return self;
}
//重写setter方法
-(void)setList:(NSMutableArray *)list{
    _list = list;
    //    _list = list;
    //    NSLog(@"%@",list);
    NSMutableArray *array = [NSMutableArray array];
    
    for (NSDictionary *dic in _list) {//遍历数组
        WSAuthorModel *authorModel = [WSAuthorModel modelWithDictionary:dic];
        authorModel.objectId = nil;
        for (BmobObject *post in _resluts) {
            if ([[post objectForKey:@"authorName"] isEqualToString:authorModel.nickname]) {
                authorModel.objectId = [post objectForKey:@"objectId"];
                break;
            }
        }
        [array addObject:authorModel];
        
    }
    _list = [NSMutableArray arrayWithArray:array];
    
}


@end
